﻿using Volo.Abp.DependencyInjection;
using YAPACS.BusinessObjects.Managements.Exams;
using YAPACS.Workflows;

namespace YAPACS.RisServer.Workflows.Register;

public class GetHeaders : WorkflowBase, IGetHeaders, ITransientDependency
{
    protected override async Task<WorkflowOutput> InvokeCoreAsync(WorkflowInput input)
    {
        string content = string.Empty;
        const string key = "Filter";
        if (input.ContainsKey(key) && input.GetValueOrDefault(key) is ExamFilter examFilter)
        {
            //根据ExamFilter.Code?获取表头信息
        }
        if (string.IsNullOrWhiteSpace(content))
        {
            content = await Extensions.GetResourceStringAsync("Resources.Register.columns.json");
        }
        return new WorkflowOutput
        {
            Success = true,
            Data = content
        };
    }
}
